<extend name="Public/common" />
<block name="body">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>添加管理员</h5>
                    <h5 style="float: right;"><a href="javascript:location.reload();"><i class="fa fa-refresh"></i></a></h5>
                </div>
                <div class="ibox-content">
                    <div class="form-horizontal">
                        <!--<div class="form-group">-->
                            <!--<label class="col-sm-2 control-label">推荐用户</label>-->

                            <!--<div class="col-sm-10">-->
                                <!--<input type="text" class="form-control" name="recommend" placeholder="请填写用户名" id="recommend" />-->
                            <!--</div>-->
                        <!--</div>-->
                        <div class="form-group">
                            <label class="col-sm-2 control-label">用户名</label>

                            <div class="col-sm-10">
                                <input type="text" class="form-control" name="username" placeholder="请填写用户名" id="username">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">上传头像</label>
                            <div class="col-sm-10">
                                <!--dom结构部分-->
                                <div id="uploader-demo">
                                    <!--用来存放item-->
                                    <div id="fileList" class="uploader-list" style="width:100px;"></div>
                                    <div id="filePicker"><i class="fa fa-upload"></i> 选择图片</div>
                                </div>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">密码</label>

                            <div class="col-sm-10">
                                <input type="password" class="form-control" name="password" placeholder="请填写密码" id="password">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">确认密码</label>

                            <div class="col-sm-10">
                                <input type="password" class="form-control" name="confirm" placeholder="请填写确认密码" id="confirm">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                状态
                            </label>

                            <div class="col-sm-10">
                                <div class="radio i-checks">
                                    <label><input type="radio" value="0" name="status" checked="checked"> <i></i> 启用</label>
                                    <label><input type="radio" value="1" name="status"> <i></i>禁用</label>
                                </div>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">角色</label>

                            <div class="col-sm-10">
                                <select class="form-control m-b" name="role_id" id="role_id">
                                    <volist name="role" id="role">
                                        <option value="{$role.id}">{$role.name}</option>
                                    </volist>
                                </select>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>

                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button class="btn btn-primary" id="save">保存内容</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    //定义全局变量
    var GV = {
        user_adduser : "{:U('User/addUser')}",
        user_is_username : "{:U('User/is_username')}"
    };
</script>
<script src="__JS__/http/user/adduser.js"></script>
<script src="__JS__/http/upload.js"></script>
</block>